<div id="<%= id %>" class="filter-container">
  <button id="dropdown-trigger-resource" data-controller="dropdown" data-target="dropdown-menu-resource" data-open-md="true">
    <% resource_types.each do |resource_type| %>
      <span data-value="<%= resource_type[0] %>" class="<%= "is-active" if filter_param == resource_type[0] %>">
        <%= text_with_resource_icon(*resource_type) %>
      </span>
    <% end %>
    <%= icon "arrow-down-s-line" %>
    <%= icon "arrow-up-s-line" %>
  </button>
  <ul id="dropdown-menu-resource">
    <% resource_types.each do |resource_type| %>
      <li role="menuitem">
        <%= link_to filter_url(resource_type[0]), class: "filter#{" is-active" if filter_param == resource_type[0]}" do %>
          <span class="sr-only"><%= resource_type[1] %></span>
          <%= text_with_resource_icon(*resource_type) %>
        <% end %>
      </li>
    <% end %>
  </ul>
</div>
